<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>菜鸟教程(runoob.com)</title>
<script>
	/*document.onkeydown = function (event) {
        var e = event || window.event || arguments.callee.caller.arguments[0];   
         
         debugger;
        if (e && e.keyCode == 32 && e.ctrlKey) {
            alert("hello world");
        }
    };*/
   function hotkey(event){
        var e = event || window.event || arguments.callee.caller.arguments[0]
        if (e && e.keyCode == 32) {
            alert('hello world');
        }
   };
   document.onkeydown = hotkey;
   

function displayDate() {
	document.getElementById("demo").innerHTML=Date();
	}     
</script>
</head>
<body>

<h1>我的第一个 JavaScript 程序</h1>
<p id="demo">这是一个段落</p>

<button type="button" onclick="displayDate()">显示日期</button>

	<input id="name" name="name" onfocus="document.onkeydown = null" onblur="document.onkeydown = hotkey"/> 

</body>
</html>
